import {Pipe, PipeTransform} from "@angular/core";
import {Logger} from "../utils/logger";

@Pipe({name: 'yesorno'})
export class YesOrNoPipe implements PipeTransform {
    transform(value: number): string {
        Logger.log('yesorno pipe value: ' + value);
        if (value == undefined) {
            return 'N/A';
        } else {
            return value == 1 ? 'Yes' : 'No';
        }
    }
}
